/**
 * @file
 * @author  Tsin Smith <tsin.creator@gmail.com>
 *
 * @section DESCRIPTION
 *
 * An abstract interface for runtime images.
 *
 */

#ifndef __TSIN_UTIL_RESOLUTION_HPP__
#define __TSIN_UTIL_RESOLUTION_HPP__

#include <tsin/util/common.hpp>

namespace tsin {

        static const float RSLT_FACTOR = 10.0f;

        enum StandardResolution {
                r640x480 = 0,
                r800x450
        };

        class UTIL_DLLEXPORT Resolution {
        public:
                static int resolutionX(StandardResolution r);
                static int resolutionY(StandardResolution r);
                static float internalRangeX(StandardResolution r);
                static float internalRangeY(StandardResolution r);

                static int coord2pixelX(StandardResolution r, float coord);
                static int coord2pixelY(StandardResolution r, float coord);
                static float pixel2coordX(StandardResolution r, int pixel);
                static float pixel2coordY(StandardResolution r, int pixel);

                static int range2pixelX(StandardResolution r, float coord);
                static int range2pixelY(StandardResolution r, float coord);
                static float pixel2rangeX(StandardResolution r, int pixel);
                static float pixel2rangeY(StandardResolution r, int pixel);
        };

}

#endif /* __TSIN_UTIL_RESOLUTION_HPP__ */
